package com.lagou.edu.pojo;

/**
 * @description:
 * @author: wyw  
 * @create: 2020-04-26 15:35
 */
public class Result {
    private String message;
    private Object data;
    private Boolean success;

    public static Result error(String message){
        Result result = new Result();
        result.setMessage(message);
        result.setSuccess(false);
        return result;
    }

    public static Result success(Object data, String message){
        Result result = new Result();
        result.setData(data);
        result.setSuccess(true);
        result.setMessage(message);
        return result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }
}
